import Vue from 'vue'
import Router from 'vue-router'
import Login from '../components/login/login.vue'
import Home from '../components/home/home.vue'
Vue.use(Router)
import Users from '../components/users/users.vue'
import Rights from '@/views/rights/index.vue'
import Roles from '@/views/roles/index.vue'

export default new Router({
  routes: [
    {
      name:'login',
      path: '/login',
      component:Login
    },
    {
      name:'home',
      path: '/',
      component:Home,
      children:[
        //用户管理
        {
          name:'Users',
          path:'users',
          component:Users
        },
        //权限管理
        {
          name:'Rights',
          path:'rights',
          component:Rights
        },
        //角色列表
        {
          name:'Roles',
          path:'roles',
          component:Roles
        }
      ]
    }
  ]
})
